3.4.88 \(\int \cos ^3(c+d x) (a+b \sin (c+d x))^2 \, dx\) [388]

Optimal. Leaf size=77 \[ -\frac {\left (a^2-b^2\right ) (a+b \sin (c+d x))^3}{3 b^3 d}+\frac {a (a+b \sin (c+d x))^4}{2 b^3 d}-\frac {(a+b \sin (c+d x))^5}{5 b^3 d} \]

[Out]

-1/3*(a^2-b^2)*(a+b*sin(d*x+c))^3/b^3/d+1/2*a*(a+b*sin(d*x+c))^4/b^3/d-1/5*(a+b*sin(d*x+c))^5/b^3/d

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {2747, 711} \begin {gather*} -\frac {\left (a^2-b^2\right ) (a+b \sin (c+d x))^3}{3 b^3 d}-\frac {(a+b \sin (c+d x))^5}{5 b^3 d}+\frac {a (a+b \sin (c+d x))^4}{2 b^3 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^3*(a + b*Sin[c + d*x])^2,x]

[Out]

-1/3*((a^2 - b^2)*(a + b*Sin[c + d*x])^3)/(b^3*d) + (a*(a + b*Sin[c + d*x])^4)/(2*b^3*d) - (a + b*Sin[c + d*x]
)^5/(5*b^3*d)

Rule 711

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*(a + c*
x^2)^p, x], x] /; FreeQ[{a, c, d, e, m}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[p, 0]

Rule 2747

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^m*(b^2 - x^2)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && Integer
Q[(p - 1)/2] && NeQ[a^2 - b^2, 0]

Rubi steps

\begin {align*} \int \cos ^3(c+d x) (a+b \sin (c+d x))^2 \, dx &=\frac {\text {Subst}\left (\int (a+x)^2 \left (b^2-x^2\right ) \, dx,x,b \sin (c+d x)\right )}{b^3 d}\\ &=\frac {\text {Subst}\left (\int \left (\left (-a^2+b^2\right ) (a+x)^2+2 a (a+x)^3-(a+x)^4\right ) \, dx,x,b \sin (c+d x)\right )}{b^3 d}\\ &=-\frac {\left (a^2-b^2\right ) (a+b \sin (c+d x))^3}{3 b^3 d}+\frac {a (a+b \sin (c+d x))^4}{2 b^3 d}-\frac {(a+b \sin (c+d x))^5}{5 b^3 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.13, size = 56, normalized size = 0.73 \begin {gather*} \frac {(a+b \sin (c+d x))^3 \left (-a^2+7 b^2+3 b^2 \cos (2 (c+d x))+3 a b \sin (c+d x)\right )}{30 b^3 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^3*(a + b*Sin[c + d*x])^2,x]

[Out]

((a + b*Sin[c + d*x])^3*(-a^2 + 7*b^2 + 3*b^2*Cos[2*(c + d*x)] + 3*a*b*Sin[c + d*x]))/(30*b^3*d)

________________________________________________________________________________________

Maple [A]
time = 0.35, size = 78, normalized size = 1.01

method result size
derivativedivides \(\frac {b^{2} \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{4}\left (d x +c \right )\right )}{5}+\frac {\left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{15}\right )-\frac {a b \left (\cos ^{4}\left (d x +c \right )\right )}{2}+\frac {a^{2} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}}{d}\) \(78\)
default \(\frac {b^{2} \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{4}\left (d x +c \right )\right )}{5}+\frac {\left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{15}\right )-\frac {a b \left (\cos ^{4}\left (d x +c \right )\right )}{2}+\frac {a^{2} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}}{d}\) \(78\)
risch \(\frac {3 a^{2} \sin \left (d x +c \right )}{4 d}+\frac {b^{2} \sin \left (d x +c \right )}{8 d}-\frac {\sin \left (5 d x +5 c \right ) b^{2}}{80 d}-\frac {a b \cos \left (4 d x +4 c \right )}{16 d}+\frac {a^{2} \sin \left (3 d x +3 c \right )}{12 d}-\frac {\sin \left (3 d x +3 c \right ) b^{2}}{48 d}-\frac {a b \cos \left (2 d x +2 c \right )}{4 d}\) \(113\)
norman \(\frac {\frac {4 a b \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {4 a b \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {2 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {2 a^{2} \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {8 \left (2 a^{2}+b^{2}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}+\frac {8 \left (2 a^{2}+b^{2}\right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}+\frac {4 \left (25 a^{2}-4 b^{2}\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{15 d}+\frac {4 a b \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {4 a b \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}\) \(203\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^3*(a+b*sin(d*x+c))^2,x,method=_RETURNVERBOSE)

[Out]

1/d*(b^2*(-1/5*sin(d*x+c)*cos(d*x+c)^4+1/15*(2+cos(d*x+c)^2)*sin(d*x+c))-1/2*a*b*cos(d*x+c)^4+1/3*a^2*(2+cos(d
*x+c)^2)*sin(d*x+c))

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 73, normalized size = 0.95 \begin {gather*} -\frac {6 \, b^{2} \sin \left (d x + c\right )^{5} + 15 \, a b \sin \left (d x + c\right )^{4} - 30 \, a b \sin \left (d x + c\right )^{2} + 10 \, {\left (a^{2} - b^{2}\right )} \sin \left (d x + c\right )^{3} - 30 \, a^{2} \sin \left (d x + c\right )}{30 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a+b*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

-1/30*(6*b^2*sin(d*x + c)^5 + 15*a*b*sin(d*x + c)^4 - 30*a*b*sin(d*x + c)^2 + 10*(a^2 - b^2)*sin(d*x + c)^3 -
30*a^2*sin(d*x + c))/d

________________________________________________________________________________________

Fricas [A]
time = 0.35, size = 69, normalized size = 0.90 \begin {gather*} -\frac {15 \, a b \cos \left (d x + c\right )^{4} + 2 \, {\left (3 \, b^{2} \cos \left (d x + c\right )^{4} - {\left (5 \, a^{2} + b^{2}\right )} \cos \left (d x + c\right )^{2} - 10 \, a^{2} - 2 \, b^{2}\right )} \sin \left (d x + c\right )}{30 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a+b*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

-1/30*(15*a*b*cos(d*x + c)^4 + 2*(3*b^2*cos(d*x + c)^4 - (5*a^2 + b^2)*cos(d*x + c)^2 - 10*a^2 - 2*b^2)*sin(d*
x + c))/d

________________________________________________________________________________________

Sympy [A]
time = 0.27, size = 107, normalized size = 1.39 \begin {gather*} \begin {cases} \frac {2 a^{2} \sin ^{3}{\left (c + d x \right )}}{3 d} + \frac {a^{2} \sin {\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} - \frac {a b \cos ^{4}{\left (c + d x \right )}}{2 d} + \frac {2 b^{2} \sin ^{5}{\left (c + d x \right )}}{15 d} + \frac {b^{2} \sin ^{3}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{3 d} & \text {for}\: d \neq 0 \\x \left (a + b \sin {\left (c \right )}\right )^{2} \cos ^{3}{\left (c \right )} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**3*(a+b*sin(d*x+c))**2,x)

[Out]

Piecewise((2*a**2*sin(c + d*x)**3/(3*d) + a**2*sin(c + d*x)*cos(c + d*x)**2/d - a*b*cos(c + d*x)**4/(2*d) + 2*
b**2*sin(c + d*x)**5/(15*d) + b**2*sin(c + d*x)**3*cos(c + d*x)**2/(3*d), Ne(d, 0)), (x*(a + b*sin(c))**2*cos(
c)**3, True))

________________________________________________________________________________________

Giac [A]
time = 4.48, size = 80, normalized size = 1.04 \begin {gather*} -\frac {6 \, b^{2} \sin \left (d x + c\right )^{5} + 15 \, a b \sin \left (d x + c\right )^{4} + 10 \, a^{2} \sin \left (d x + c\right )^{3} - 10 \, b^{2} \sin \left (d x + c\right )^{3} - 30 \, a b \sin \left (d x + c\right )^{2} - 30 \, a^{2} \sin \left (d x + c\right )}{30 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a+b*sin(d*x+c))^2,x, algorithm="giac")

[Out]

-1/30*(6*b^2*sin(d*x + c)^5 + 15*a*b*sin(d*x + c)^4 + 10*a^2*sin(d*x + c)^3 - 10*b^2*sin(d*x + c)^3 - 30*a*b*s
in(d*x + c)^2 - 30*a^2*sin(d*x + c))/d

________________________________________________________________________________________

Mupad [B]
time = 0.05, size = 74, normalized size = 0.96 \begin {gather*} -\frac {{\sin \left (c+d\,x\right )}^3\,\left (\frac {a^2}{3}-\frac {b^2}{3}\right )-a^2\,\sin \left (c+d\,x\right )+\frac {b^2\,{\sin \left (c+d\,x\right )}^5}{5}-a\,b\,{\sin \left (c+d\,x\right )}^2+\frac {a\,b\,{\sin \left (c+d\,x\right )}^4}{2}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)^3*(a + b*sin(c + d*x))^2,x)

[Out]

-(sin(c + d*x)^3*(a^2/3 - b^2/3) - a^2*sin(c + d*x) + (b^2*sin(c + d*x)^5)/5 - a*b*sin(c + d*x)^2 + (a*b*sin(c
 + d*x)^4)/2)/d

________________________________________________________________________________________